<?php

class VariosController extends Sgit_Controller_Action
{

    protected $_main_model = 'CuentasVarios';
    protected $_main_form = 'varios';


    public function editarAction()
    {
        
        $anio=$this->_getParam('anio');
        $where['anio = ?']=$anio;
        $id = $this->_model->default->GetOne('id',$where);
        
        if(!$id) $id= $this->_model->default->insertRow(array('anio'=>$anio));
        
        $this->_id=$id;
        
        $this->_reload();
        $this->_editar();
    }


}

